package com.material.factory.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.material.common.utils.bean.BeanUtil;
import com.material.factory.domain.FactoryFuel;
import com.material.factory.domain.FactoryInfo;
import com.material.factory.mapper.FactoryFuelMapper;
import com.material.factory.mapper.FactoryInfoMapper;
import com.material.factory.vo.FactoryFuelRuleVo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.material.factory.mapper.FactoryFuelRuleMapper;
import com.material.factory.domain.FactoryFuelRule;
import com.material.factory.service.IFactoryFuelRuleService;

/**
 * 燃料检测结算奖惩规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class FactoryFuelRuleServiceImpl implements IFactoryFuelRuleService
{
    @Autowired
    private FactoryFuelRuleMapper factoryFuelRuleMapper;
    @Autowired
    private FactoryFuelMapper factoryFuelMapper;
    @Autowired
    private FactoryInfoMapper factoryInfoMapper;

    /**
     * 查询燃料检测结算奖惩规则
     *
     * @param id 燃料检测结算奖惩规则主键
     * @return 燃料检测结算奖惩规则
     */
    @Override
    public FactoryFuelRule selectFactoryFuelRuleById(Long id)
    {
        return factoryFuelRuleMapper.selectFactoryFuelRuleById(id);
    }

    /**
     * 查询燃料检测结算奖惩规则列表
     *
     * @param factoryFuelRule 燃料检测结算奖惩规则
     * @return 燃料检测结算奖惩规则
     */
    @Override
    public List<FactoryFuelRule> selectFactoryFuelRuleList(FactoryFuelRule factoryFuelRule)
    {
        return factoryFuelRuleMapper.selectFactoryFuelRuleList(factoryFuelRule);
    }

    /**
     * 新增燃料检测结算奖惩规则
     *
     * @param factoryFuelRule 燃料检测结算奖惩规则
     * @return 结果
     */
    @Override
    public int insertFactoryFuelRule(FactoryFuelRule factoryFuelRule)
    {
        return factoryFuelRuleMapper.insertFactoryFuelRule(factoryFuelRule);
    }

    /**
     * 修改燃料检测结算奖惩规则
     *
     * @param factoryFuelRule 燃料检测结算奖惩规则
     * @return 结果
     */
    @Override
    public int updateFactoryFuelRule(FactoryFuelRule factoryFuelRule)
    {
        return factoryFuelRuleMapper.updateFactoryFuelRule(factoryFuelRule);
    }

    /**
     * 批量删除燃料检测结算奖惩规则
     *
     * @param ids 需要删除的燃料检测结算奖惩规则主键
     * @return 结果
     */
    @Override
    public int deleteFactoryFuelRuleByIds(Long[] ids)
    {
        return factoryFuelRuleMapper.deleteFactoryFuelRuleByIds(ids);
    }

    /**
     * 删除燃料检测结算奖惩规则信息
     *
     * @param id 燃料检测结算奖惩规则主键
     * @return 结果
     */
    @Override
    public int deleteFactoryFuelRuleById(Long id)
    {
        return factoryFuelRuleMapper.deleteFactoryFuelRuleById(id);
    }

    @Override
    public List<FactoryFuelRuleVo> selectFactoryFuelRulePageList(FactoryFuelRule factoryFuelRule) {
        List<FactoryFuelRuleVo> rules = factoryFuelRuleMapper.selectFactoryFuelRulePageList(factoryFuelRule);
        return rules;
    }
}
